package thread;


class MyThread extends Thread {
    @Override
    public void run() {
        while (true) {
            System.out.println("thread");
        }

    }
}

public class Demo {

    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        System.out.println("11111");
        myThread.setDaemon(true);
        myThread.start();
//        while (true) {
//            System.out.println("main");
//        }

    }
}
